//
//  FactoryVc.m
//  Project_Demo
//
//  Created by Leon on 2018/6/30.
//  Copyright © 2018年 caoxiaozhu. All rights reserved.
//

#import "FactoryVc.h"


@interface FactoryVc ()

@end

@implementation FactoryVc

- (void)viewDidLoad {
    [super viewDidLoad];
    
    XZ_BaseWKWebViewController *webView = [[XZ_BaseWKWebViewController alloc]init];
//    webView.view.frame = CGRectMake(0, 0, kscreenWidth, kscreenHeight);
//    webView.urlStr = @"https://www.jianshu.com/p/847af218b1f0";
    [webView showWebViewWith:@"https://www.jianshu.com/p/847af218b1f0" localHtml:nil jsActionNameArr:nil];
    [self addChildViewController:webView];
    [self.view addSubview:webView.view];
    
    [self setupFactoryMethod];
}

-(void)setupFactoryMethod{
    
    /*
     简单工厂方法:
     工厂方法的核心就是通过一个工厂类去分发创建对象，从而起到统一管理的作用,这里通过一个简单的动物工厂，来分别创建狗，人和猫三个对象
     */
    XZ_Operation *mantouOperation = [XZ_Factory operationBreakFast:XZ_ProductTypeMantou];
    [mantouOperation productBreakfast];
    NSLog(@"生产的是%@",mantouOperation.product);
}


@end
